package com.gdwhomework.generic.homework01;

import org.junit.jupiter.api.Test;

import java.util.List;

/**
 * @author 关道伟
 * @version 1.0
 */
public class Homework01 {
    public static void main(String[] args) {

    }
    @Test
    public void testList(){
        DAO<User> dao = new DAO();
        dao.save("001",new User(11,1,"jack"));
        dao.save("002",new User(13,2,"rose"));
        dao.save("003",new User(33,3,"xiaoli"));

        List<User> list = dao.list();
        System.out.println("list="+list);

        dao.delete("001");
        list = dao.list();
        System.out.println("list="+list);

        dao.save("03",new User(22,3,"关"));
        list = dao.list();
        System.out.println("list="+list);

    }
}
